export default [
  {
    path: "/home",
    component: () => import("@/views/Home"),
    name: "Home"
  },
  {
    path: "/login",
    component: () => import("@/views/Login"),
    name: "Login",
    meta: {
      FooterIsHidden: true,
    },

  },
  {
    path: "/search/:keyword?",
    component: () => import("@/views/Search"),
    name: "Search",
    props(route) {
      return {
        ...route.query,
        ...route.params
      };
    }
  },
  {
    path: "/detail/:skuId",
    component: () => import("@/views/Detail"),
    name: "Detail",

  },

  {
    path: "/addcartsuccess",
    component: () => import("@/views/AddCartSuccess"),
    name: "AddCartSuccess",

  },
  {
    path: "/shopcart",
    component: () => import("@/views/ShopCart"),
    name: "shopCart",
  },
  {
    path: "/register",
    component: () => import("@/views/Register"),
    name: "Register",
    meta: {
      FooterIsHidden: true,
    },
  },
  {
    path: "/",
    redirect: "/home"
  },
  {
    path: "/*",
    component: () => import("@/views/404")
  }
];